package com.qf.spring.mybatis.service.impl;

import com.qf.spring.mybatis.mapper.DepartmentMapper;
import com.qf.spring.mybatis.pojo.TDepartments;
import com.qf.spring.mybatis.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DepartmentServiceImpl implements DepartmentService {

    private DepartmentMapper departmentMapper;
    @Autowired
    public void setDepartmentMapper(DepartmentMapper departmentMapper) {
        this.departmentMapper = departmentMapper;
    }

    @Override
    public TDepartments findById(long id) {

        return departmentMapper.findById(id);
    }

    @Override
    public void insertDept(TDepartments dept) {
        departmentMapper.insertDept(dept);
    }
}
